<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>添加页面</title>
</head>
<body>
<div class="ui container">
    <form class="ui form" th:action="@{/update}" method="post" th:object="${students}">
        <input type="hidden" th:value="${student.id}" name="id">
        <div class="field">
            <label>学生姓名</label>
            <input type="text" name="name"  required th:value="${student.name}">
        </div>
        <div class="field">
            <label>学生年龄</label>
            <input type="text" name="age"  required th:value="${student.age}">
        </div>
        <div class="field">
            <label>出生日期</label>
            <input type="date" name="birthday" required pattern="yyyy-MM-dd" th:value="${#dates.format(student.createTime, 'yyyy-MM-dd')}">
        </div>
        <button class="ui button" type="submit">提交</button>
    </form>
</div>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
</body>
</html>